<template>
  <div id="app">
    <!-- 路由view -->
    <router-view />
    <!-- 底部tabbar组件 -->
    <Tabbar :tabbar="this.$store.state.tabbar" />
    
  </div>
</template>

<script>
//导入tabbar底部tab组件
import Tabbar from "./components/Tabs/Tabbar/Tabbar";
//导入vuex actions 和state
import { mapActions, mapState } from "vuex";

export default {
  name: "App",
  data() {
    return {

    };
  },
  //组件注册
  components: {
    Tabbar
  },
  methods: {
    //actions方法注册
    ...mapActions(["reqServerData"])
  },
  created() {},
  mounted() {
    //获取底部tabbar数据请求到vuex
    this.reqServerData({
      method: "get",
      methodName: "Tabbar",
      param: []
    });
  }
};
</script>

<style>

</style>
